package com.mz.ozy.adapter;


import com.mz.ozy.activity.me.MyCardFragment;
import com.mz.ozy.activity.me.MyKeepFragment;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;
import androidx.viewpager.widget.PagerAdapter;

/**
 * Created by Administrator on 2018/4/17.
 * 我的订单
 */

public class MyKeepFragmentAdapter extends FragmentStatePagerAdapter {


    public MyKeepFragmentAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {

        switch (position) {
            case 0:
                return MyKeepFragment.newInstance(MyCardFragment.NO);
            case 1:
                return MyCardFragment.newInstance(MyCardFragment.ALREADY);

            default:
                return null;
        }
    }

    @Override
    public int getItemPosition(Object object) {
        return PagerAdapter.POSITION_NONE;
    }

    @Override
    public int getCount() {
        return 2;
    }

}
